package com.ruoyi.data.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.data.domain.BondCbAdjLogsJsl;
import com.ruoyi.data.domain.BondCbIndexJsl;
import com.ruoyi.data.domain.BondCbJsl;
import com.ruoyi.data.domain.BondCbRedeemJsl;
import com.ruoyi.data.service.IBondCbAdjLogsJslService;
import com.ruoyi.data.service.IBondCbIndexJslService;
import com.ruoyi.data.service.IBondCbJslService;
import com.ruoyi.data.service.IBondCbRedeemJslService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Controller
 * 
 * @author leng.xz
 * @date 2024-05-02
 */
@Controller
@RequestMapping("/demo/data")
public class BondCbDemoJslController extends BaseController
{

    @Autowired
    private IBondCbAdjLogsJslService bondCbAdjLogsJslService;
    @Autowired
    private IBondCbIndexJslService bondCbIndexJslService;
    @Autowired
    private IBondCbJslService bondCbJslService;
    @Autowired
    private IBondCbRedeemJslService bondCbRedeemJslService;

    @GetMapping("/jslAdj")
    public String jslAdj()
    {
        return  "demo/data/jslAdj/jslAdj";
    }

    /**
     * 查询价格调整列表
     */
    @PostMapping("/jslAdj/list")
    @ResponseBody
    public TableDataInfo list(BondCbAdjLogsJsl bondCbAdjLogsJsl)
    {
        startPage();
        List<BondCbAdjLogsJsl> list = bondCbAdjLogsJslService.selectBondCbAdjLogsJslList(bondCbAdjLogsJsl);
        return getDataTable(list);
    }


    @GetMapping("/jslIndex")
    public String jslIndex()
    {
        return  "demo/data/jslIndex/jslIndex";
    }

    /**
     * 查询等权指数列表
     */
    @PostMapping("/jslIndex/list")
    @ResponseBody
    public TableDataInfo list(BondCbIndexJsl bondCbIndexJsl)
    {
        startPage();
        List<BondCbIndexJsl> list = bondCbIndexJslService.selectBondCbIndexJslList(bondCbIndexJsl);
        return getDataTable(list);
    }


    @GetMapping("/jslInfo")
    public String jslInfo()
    {
        return "demo/data/jslInfo/jslInfo";
    }

    /**
     * 查询实时数据列表
     */
    @PostMapping("/jslInfo/list")
    @ResponseBody
    public TableDataInfo list(BondCbJsl bondCbJsl)
    {
        startPage();
        List<BondCbJsl> list = bondCbJslService.selectBondCbJslList(bondCbJsl);
        return getDataTable(list);
    }

    @GetMapping("/jslRedeem")
    public String jslRedeem()
    {
        return  "demo/data/jslRedeem/jslRedeem";
    }

    /**
     * 查询强赎列表
     */
    @PostMapping("/jslRedeem/list")
    @ResponseBody
    public TableDataInfo list(BondCbRedeemJsl bondCbRedeemJsl)
    {
        startPage();
        List<BondCbRedeemJsl> list = bondCbRedeemJslService.selectBondCbRedeemJslList(bondCbRedeemJsl);
        return getDataTable(list);
    }



}
